/*    */ package com.wzh.action.front.book;
/*    */ 
/*    */ import com.opensymphony.xwork2.ActionContext;
/*    */ import com.wzh.action.front.CommonAction;
/*    */ import com.wzh.bean.book.BookType;
/*    */ import com.wzh.service.bookinfo.booktype.BookTypeService;
/*    */ import com.wzh.utils.WebTool;
/*    */ import javax.annotation.Resource;
/*    */ import org.apache.struts2.ServletActionContext;
/*    */ 
/*    */ public class BookTypeAction extends CommonAction
/*    */ {
/*    */   private static final long serialVersionUID = 1L;
/*    */ 
/*    */   @Resource
/*    */   private BookTypeService bookTypeService;
/*    */   private int type;
/*    */   private String filename;
/* 21 */   private int page = 1;
/*    */ 
/*    */   public int getPage()
/*    */   {
/* 28 */     return this.page;
/*    */   }
/*    */ 
/*    */   public void setPage(int page)
/*    */   {
/* 33 */     this.page = page;
/*    */   }
/*    */ 
/*    */   public String getFilename()
/*    */   {
/* 38 */     return this.filename;
/*    */   }
/*    */ 
/*    */   public void setFilename(String filename)
/*    */   {
/* 43 */     this.filename = filename;
/*    */   }
/*    */ 
/*    */   public int getType()
/*    */   {
/* 48 */     return this.type;
/*    */   }
/*    */ 
/*    */   public void setType(int type)
/*    */   {
/* 53 */     this.type = type;
/*    */   }
/*    */ 
/*    */   public String list()
/*    */   {
/* 58 */     BookType bookType = null;
/* 59 */     if (this.type > 0)
/* 60 */       bookType = (BookType)this.bookTypeService.find(Integer.valueOf(this.type));
/* 61 */     else if ((this.filename != null) && (!"".equals(this.filename))) {
/* 62 */       bookType = this.bookTypeService.findTypeByFilename(this.filename);
/*    */     }
/*    */ 
/* 66 */     ActionContext.getContext().put("booktype", bookType);
/*    */ 
/* 68 */     if (WebTool.isMHost(ServletActionContext.getRequest()))
/*    */     {
/* 70 */       this.template += "/mobile";
/*    */     }
/* 72 */     return "list";
/*    */   }
/*    */ }

/* Location:           C:\work\apache-tomcat-7.0.55\webapps\ROOT\WEB-INF\classes\
 * Qualified Name:     com.wzh.action.front.book.BookTypeAction
 * JD-Core Version:    0.6.1
 */